import request from '@/utils/request'
//分类列表接口
export const getCategoryListAPI = (data) => request('/api/admin/category', 'get', data)
//分类详情
export const getCategoryInfoAPI = (category) => request(`/api/admin/category/${category}`, 'get')
//禁用启用
export const changCategoryStatusAPI = (category) =>
    request(`/api/admin/category/${category}/status`, 'PATCH')
export const addCategoryAPI = (data) => request('/api/admin/category', 'POST', data)
export const updateCategoryListAPI = (data, category) =>
    request(`/api/admin/category/${category}`, 'PUT', data)
